package dataStruct.queue.ex4;

import dataStruct.queue.ex3.MsgBody;

import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by thinkpad on 2016/9/19.
 */
public class test {
    public static void main(String[] args) {
        ExecutorService service = Executors.newFixedThreadPool(5);
        SerialExecutor serialExecutor = new SerialExecutor(service);
        serialExecutor.execute(new Scheduler(new LinkedList<MsgBody>(), null));
        Queue<MsgBody> msgQueue = new LinkedList<MsgBody>();
        msgQueue.add(new MsgBody(null, null,null,null));
        serialExecutor.execute(new Scheduler(msgQueue, null));
    }
}
